function accuracy = test_for_dim(data)

accuracy =[];
classes = [ones(700,1);zeros(700,1);ones(300,1);zeros(300,1)];


k=1;


for i=100:50:500
  top_features= infogain(data,i); 
  %top_features=data;
   
   training_data = [top_features(1:700,:); top_features(1001:1700,:)];
   test_data = [top_features(701:1000,:); top_features(1701:2000,:)];
   
   accuracy(k) = SVM([training_data;test_data],classes)
   
   k=k+1;

   
end